- [Instructor] One of the challenges
when building circuits with op amps
is that they often need dual supply voltages
to draw power from both positive
and negative voltage sources.
An op amp can only output voltages within the range
between its power rails.
So, if an op amp is being used to generate an AC signal
that has positive and negative voltages,
the op amp's power rails will need to be connected
to both positive and negative supply voltages.
Benchtop power supplies like this one make that easy
because it provides output terminals
for positive and negative voltages,
both relative to a common ground terminal in the middle.
If I configure this power supply to output five volts,
the terminal on the left
will provide me with positive five volts,
relative to that common ground,
and the terminal on the right
will give me negative five volts.
When I use a benchtop power supply
to provide dual voltages for my breadboard,
I like to connect the common ground bus
to each side of the breadboard
on its innermost power rails.
Then I connect the positive supply line
to the red rail on the far left
with the plus symbol,
and I connect the negative supply line
to the black rail on the far right
with the minus symbol.
You can organize your power buses
on your own breadboard however you want.
Do what makes sense for your own circuits.
This configuration is just my personal preference
for connecting dual voltage supplies
because it gives me easy access
to the common ground voltage on either side of the board.
If you're using a benchtop power supply,
then supplying dual voltages for a circuit is simple.
But, if you're using another type of power source
that only provides a single voltage,
like a battery or a wall wart,
then you'll have to turn that single voltage
into positive and negative voltages yourself.
The easiest way to do that
is to use an integrated circuit component
that's specifically designed to convert
from one DC voltage to another.
For example, the TC7660H DC-to-DC converter chip,
from Microchip, can generate a negative voltage
from a positive source.
It takes a positive input voltage between 1.5 to 10 volts
and outputs the corresponding negative voltage.
If I'm using a single power source,
like a five volt wall adapter,
I can use the TC7660H chip
to generate negative five volts
which gives me the dual voltages I need for my circuit.
Now, using these types of DC-to-DC converter chips
is usually a bit more complicated than just
inserting them into your circuit.
You'll almost always need to include
a few external capacitors or inductors
around the device for it to function correctly.
So you should look at the device's data sheet
to figure out which additional components you'll need
and how to connect them.
If you don't have a benchtop power supply
or any DC-to-DC converter chips,
you're still not completely out of luck.
There's a third way that you can generate
positive and negative supply voltages
for an op amp circuit,
and that's to create what's known as a virtual ground.
By dividing a source voltage in half.
Virtual ground is a circuit node
that's used as a steady reference potential
for other voltages.
But it's not directly connected to the original ground
or common reference potential for the circuit.
The easiest way to split a voltage in half
is by using a voltage divider
with two equal value resistors in series.
If I connect that voltage divider to a nine volt battery,
it'll cut that nine volt source in half
to produce 4.5 volts in the middle.
The voltage values shown here are all positive
because I'm treating the negative battery terminal
as my common potential reference point.
Which, is the normal thing to do.
But, if instead I change my point of reference
to treat the middle of the voltage divider
as zero volts, or my virtual ground,
then the voltages at the positive
and negative battery terminals
will be plus and minus 4.5 volts
relative to that virtual ground.
And I can use those dual voltage sources
to power my circuit.
Now, one downside to this approach
is that when I connect an electrical load
to the voltage divider
that's generating my dual voltage sources,
if that load's impedance is too low
between the center voltage
and either of the battery terminals,
then that can change the balance
of the voltage divider ratio.
I'm still treating the middle of the voltage divider
as my zero volt reference,
but now the positive and negative supply voltages
will be unevenly distributed
relative to the virtual ground.
So, what I need to do to fix this
is find a way to buffer the output
from the voltage divider
so that it's not impacted by whatever else
is connected to it downstream.
And that's easy to do
with a simple voltage follower op amp circuit
serving as a unity gain buffer.
The op amp has an extremely high input impedance,
so it won't affect the ratio of the voltage divider.
And its low output impedance
enables it to maintain a steady output voltage
when it's connected to different loads.
Since the virtual ground voltage that it's producing
is between the original supply voltages
from the positive and negative battery terminals,
I'll use those to supply power for the op amp.
I've built that buffered voltage divider on my breadboard
using a nine volt battery to provide
the positive and negative supply voltages.
The negative battery terminal
is connected to the negative power bus
on the far right side of the board,
and the positive battery terminal
is connected to the positive bus on the far left side.
Those will be my plus and minus 4.5 volt power supply lines.
These two resistors act as the voltage divider
to create the voltage for my virtual ground.
I don't want my voltage divider to draw too much current.
It's just there to produce a voltage for reference,
so I used a pair of fairly high resistance
one megohm resistors.
Their output is buffered
by a voltage follower op amp circuit
and its output, which is the virtual ground,
gets shared to both of the inner power rails
using this green wire.
To check how these virtual supply voltages
relate to each other,
I'll anchor the black probe of my DMM to the virtual ground,
and now I'll use the red probe
to measure the positive supply voltage.
And I can see that it's a little more than
four and a half volts above the virtual ground,
and that's half the output voltage
from my nine volt battery.
And when I move the red probe
to measure the negative supply voltage,
I see that it's around negative 4.5 volts
relative to the virtual ground.
It's very important to remember
that the virtual ground created by this circuit
is different than the actual circuit ground,
or common reference,
and that you should never connect the two together.
For example, if I was using a grounded power source,
like a 12 volt DC wall adapter to power the circuit,
and I used a voltage divider to split the 12 volt input
into plus and minus six volts,
that virtual ground that it produces
in the middle of the voltage divider
is different from the actual ground of the wall adapter.
If I tried to connect my new
virtual ground-based power source to another circuit
that included something like an Arduino microcontroller,
whose power supply is connected to the actual ground,
I've just made a connection
between my virtual ground and the actual ground
which will create a short circuit between the two
and cause unwanted current to flow
that'll most likely damage these devices.
To avoid that problem,
when I'm building circuits with a virtual ground,
I always use a floating power source,
like a nine volt battery,
that's not connected to the actual ground.
The nine volt battery may not be able to provide much power
compared to a DC wall adapter,
but at least I won't have to worry about
accidentally connecting different grounds together.
I'll be using this circuit with a nine volt battery
to provide dual supply voltages
as I build and demonstrate op amp circuits
throughout the rest of this course.